package com.qq.BFMRSE.runnable;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.qq.BFMRSE.entity.encryptedIndex;
import com.qq.BFMRSE.entity.indexTree;
import com.qq.BFMRSE.index.buildIndex;

public class indexBuildRunnable implements Runnable{
	private Map<String, encryptedIndex>indexMap;
	private indexTree searchIndexTree;
	private buildIndex buIndex;
	private List<String>fileNameList;
	public Map<String, encryptedIndex> getIndexMap() {
		return indexMap;
	}
	public void setIndexMap(Map<String, encryptedIndex> indexMap) {
		this.indexMap = indexMap;
	}
	public indexTree getSearchIndexTree() {
		return searchIndexTree;
	}
	public void setSearchIndexTree(indexTree searchIndexTree) {
		this.searchIndexTree = searchIndexTree;
	}
	public void setBuIndex(buildIndex buIndex){
		this.buIndex=buIndex;
	}
	public buildIndex getBuIndex(){
		return buIndex;
	}
	public List<String> getFileNameList() {
		return fileNameList;
	}
	public void setFileNameList(List<String> fileNameList) {
		this.fileNameList = fileNameList;
	}
	public indexBuildRunnable(String skFile,List<String>fileNameList,buildIndex buIndex){
		this.buIndex=buIndex;
		this.fileNameList=fileNameList;
		indexMap=new HashMap<>();
		searchIndexTree=new indexTree();
	}
	public indexBuildRunnable(){}

	@Override
	public void run() {
		indexMap=buIndex.getAllEncryptedIndexs(fileNameList);
		searchIndexTree=buIndex.buildIndexTree(fileNameList);

	}

}
